home *** CD-ROM | disk | FTP | other *** search
/ Quarterdeck InternetSuite / Quarterdeck InternetSuite.iso / qsockpro.qip / PORTALSN.MPS < prev    next >
Encoding:
Text File  |  1996-03-20  |  1.3 KB  |  57 lines

  1. # Portal Sprintnet PPP and SLIP script
  2. # Copyright 1995 Quarterdeck Corporation
  3. # 5-9-95
  4.  
  5. STRING username
  6. STRING password
  7. STRING IPaddress
  8. STRING framing
  9.  
  10. #TRACE ON
  11. SetTimeout 90                      # reset maximum script timeout
  12.  
  13. # Get username from access method
  14. CfgGetValue "Username" username
  15. IF result = 0 THEN
  16.     ABORT "Can't load Username from qdeck.ini"
  17. ENDIF
  18.  
  19. # get password from access method
  20. CfgGetValue "Password" password
  21. IF result = 0 THEN
  22.     ABORT "Can't load Password from qdeck.ini"
  23. ENDIF
  24.  
  25. CfgGetValue "Framing" framing
  26. IF result =0 THEN
  27.     ABORT "Cannot load framing value from QDECK.INI!"
  28. ENDIF
  29.  
  30. CommSend    "@D%r"
  31. CommWaitFor "TERMINAL="
  32. CommSend    "d1%r"
  33. CommWaitFor "@"
  34. CommSend    "C PORTAL%r"
  35. CommWaitFor "help:"
  36. CommSend    "ip%r"
  37.  
  38. CommWaitFor "login:"
  39. CommSend    username
  40. CommSend    "%r"            # send carriage return
  41.  
  42. CommWaitFor "password:"
  43. CommSend    password
  44. CommSend    "%r"            # send carriage return
  45.  
  46. IF framing = "MPSLIP" THEN
  47.     PRINT "Getting IP Address for SLIP."
  48.     CommReadIPAddr IPAddress
  49.     IF result < 7 THEN                     # IP Address length test
  50.         ABORT "Missing or invalid IP Address."
  51.     ENDIF
  52.     CfgSetValue "IPAddress" ipaddress
  53.     PRINT "IP Address set to:"; ipaddress
  54. ENDIF
  55.  
  56. END
  57.